<!-- 侧边菜单 -->
<div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
        <div class="layui-logo" style="display: flex;align-items: center;justify-content: center">
            {if !empty(cache('system')['web_site_logo'])}
            <img src="{:cache('system')['web_site_logo']}"
                 style="width: 30px;height: 30px;margin-right: 5px;margin-left: -5px"/>
            {/if}
            <span style="font-size: 15px;height: inherit;line-height: inherit;margin-top: 2px;color: #fff;font-weight: bold">{:cache('system')['web_site_title']??''}</span>
        </div>

        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu"
            lay-filter="layadmin-system-side-menu">
            {foreach name="menus" item="vo" key="key"}
            <li data-name="home" class="layui-nav-item">

                <a href="javascript:;" lay-tips="{$vo.title}" lay-direction="2">
                    <i class="layui-icon {$vo.css?$vo.css:'layui-icon-component'}"></i>
                    <cite>{$vo.title}</cite>
                    <i class="layui-icon layui-icon-down layui-nav-more"></i>
                </a>
                {if isset($vo.child)}
                <dl class="layui-nav-child">
                    {foreach name="$vo.child" item="son"}
                    {if $admin_id != 1}
                        {if in_array($son['id'], $rules)}
                        <dd data-name="console">
                            {if empty($son.child)}
                            <a lay-href="{$son.href}">{$son.title}</a>
                            {else}
                            <a >{$son.title}
                                <i class="layui-icon layui-icon-down layui-nav-more"></i>
                            </a>
                            <dl class="layui-nav-child" style="">
                                {foreach name="$son.child" item="gs"}
                                <dd><a lay-href="{$gs.href}">{$gs.title}</a></dd>
                                {/foreach}
                            </dl>
                            {/if}
                        </dd>
                        {/if}
                    {else}
                    <dd data-name="console">
                        {if empty($son.child)}
                        <a lay-href="{$son.href}">{$son.title}</a>
                        {else}
                        <a >{$son.title}
                            <i class="layui-icon layui-icon-down layui-nav-more"></i>
                        </a>
                        <dl class="layui-nav-child" style="">
                            {foreach name="$son.child" item="gs"}
                            <dd><a lay-href="{$gs.href}">{$gs.title}</a></dd>
                            {/foreach}
                        </dl>
                        {/if}
                    </dd>
                    {/if}
                    {/foreach}
                </dl>
                {/if}

            </li>
            {/foreach}
            {foreach name="attachMenu" item="vo" key="key"}
            <li data-name="home" class="layui-nav-item">

                <a href="javascript:;" lay-tips="{$vo.title}" lay-direction="2">
                    <i class="layui-icon {$vo.css?$vo.css:'layui-icon-component'}"></i>
                    <cite>{$vo.title}</cite>
                    <i class="layui-icon layui-icon-down layui-nav-more"></i>
                </a>
                {if isset($vo.child)}
                <dl class="layui-nav-child">
                    {foreach name="$vo.child" item="son"}
                    <dd data-name="console">
                        <a lay-href="{$son.href}">{$son.title}</a>
                    </dd>
                    {/foreach}
                </dl>
                {/if}

            </li>
            {/foreach}


            <span class="layui-nav-bar" style="top: 255px; height: 0px; opacity: 0;"></span>
        </ul>
    </div>
</div>